{% load static %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>文章列表</title>
    <base href="/">
    <link rel="SHORTCUT ICON" href="../static/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/footer.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/dataAnalysis.css"/>
    <script type="text/javascript" src="../static/js/jquery.js"></script>
    <style>
        a {
            text-decoration: none;
        }

        body {
            background: #F6F8FA;
        }

        .main_box1 {
            background: #FFF;
            margin-top: 20px;
            width: 840px;
            margin-left: 50px;
            height: 100%;
        }

        .main-middle {
        {#height: 500px;#} height: auto;
            background-color: #F1F1F1;
            margin-top: -38px;
            margin-left: 7px;
            margin-right: 12px;
        }

        .nav {
            background-color: #34495e;
            height: 80px;
            width: 1330px;
            margin-left: 5px;
            margin-right: 5px;

        }

        .footer {
            width: 1330px;
            background-color: #34495e;
            margin-top: 5px;
            height: 80px;
            margin-left: 7px;
            margin-bottom: 5px;
        }

        .logo {
            width: 250px;
            height: 80px;
            background-color: #aee6a6;
            margin-left: 10px;
        }

        .logo img {
            width: 250px;
            height: 80px;
        }

        .post-right {
            background-color: #FFF;
            height: auto;
            width: 350px;
            float: right;
            position: absolute;
            top: 90px;
            margin-left: 920px;
        }

        .post-right-title {
            margin-top: 5px;
            margin-left: 15px;
        }

        .post-right ul {
            clear: both;
            overflow: hidden;
        }

        .post-right ul li {
            width: 48%;
            height: 100px;
            margin-bottom: 50px;
            float: left;
        }

        .post-right ul li:nth-child(even) {
            margin-left: 4%;
        }

        .hot_content {
            margin-top: 15px;
            margin-left: 10px;
            margin-right: 10px;
            height: 100%;
        }

        .hot_title {
        {#background-color: #c9302c;#} margin-top: 5px;
            height: 48px;
        }

        .hot_title a {
            color: #1F1F1F;
        }

        .hot_title a:hover {
            color: #2396ff;
        }

        .hot_img {
        {#background-color: #5cb85c;#}
        }

        .hot_img img {
            width: 158px;
            height: 90px;
        }

        .content_title {
            margin-top: 50px;
            font-size: 20px;
            margin-left: 10px;
        }

        .article-meta span {
            color: #1F1F1F;
        }

        .next_article a {
            color: #3498DB;
        }

        .next_article a:hover {
            color: #3332ff;
        }

        .like_content1 ul {
            overflow: hidden;
            margin-left: -10px;
        }

        .like_content1 ul li {
            width: 33.3333%;
            height: 200px;
            float: left;
            padding-left: 10px;
            box-sizing: border-box;
            margin-bottom: 5px;
        }

        .like_content1 ul li .com {
            height: inherit;
            background: skyblue;
        }

        .like_title h1 {
            font-size: 16px;
            font-weight: bold;

        }

        .show_img img {
            width: 264px;
            height: 160px;
        }

        .title a {
            color: #09b8ff;
        }

        .title a:hover {
            color: #3332ff;
        }

        .main-list {
        {#background-color: #5cb85c;#} height: 210px;
            width: 840px;
            margin-top: 30px;
        }

        .list_left {
        {#background-color: #03A9F4;#} height: 190px;
            width: 270px;
        }

        .list_left img {
            height: 190px;
            width: 250px;
            padding-left: 10px;
        }

        .list_right {
        {#background-color: red;#} float: right;
            width: 570px;
            height: 190px;
            margin-top: -190px;
        }

        .list_title a {
            font-size: 15px;
            color: #1F1F1F;
        }

        .list_title a:hover {
            color: #3332ff
        }

        .list_abstract {
            margin-top: 10px;
            height: 130px;

        }

        .list_abstract a {
            color: #353535;
            word-wrap: break-word;
            overflow-wrap: break-word;
            padding-left: 5px;
            padding-right: 5px;
        }

        .label-info {
            margin-right: 20px;
            padding-top: 5px;
        }

        .label-info {
            background-color: #5bc0de;
        }

        .label {
            display: inline;
            padding: .2em .6em .3em;
            font-size: 75%;
            line-height: 1;
            color: #fff;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: .25em;
        }

        .meta {
            margin-top: -5px;
        }

        .line {
            width: 820px;
            margin-left: -260px;
            margin-top: 17px;
        }

        .pagination {
            margin: 0;
            padding: 20px;
            text-align: center;
            font-size: 12px;
            display: block;
            border-radius: 4px;
        }

        .pagination ul {
            display: inline-block;
            margin-left: 0;
            margin-bottom: 0;
            padding: 0;
        }

        .pagination ul > li {
            display: inline;
        }

        .pagination ul > .active > a, .pagination ul > .active > span {
            cursor: default;
        }

        .pagination ul > .active > a, .pagination ul > .active > span {
            background-color: #d9534f;
            color: #fff;
        }

        .pagination ul > li > a, .pagination ul > li > span {
            margin: 0 2px;
            float: left;
            padding: 5px 12px;
            background-color: #ddd;
            color: #666;
            border-radius: 2px;
            opacity: .88;
        }

        .pagination ul > li > a:hover, .pagination ul > li > a:focus {
            color: #fff;
            background-color: #d9534f;
        }

        .article_content {
            width: 840px;
            background-color: #fff;
            margin-top: -38px;
            height: auto;
            margin-left: 7px;
        }

    </style>
</head>
<body>
{% include 'base.html' %}
<div class="main-middle">
    <div class="main_box1">
        <div class="article_content">
            <div class="content_title">
                <h1 class="content_title">分类：{{ cname }}</h1>
            </div>
            {% for list in list %}
                <div class="main-list">
                    <div class="list_left">
                        <a href="{% url 'index' %}blog/show{{ list.id }}"><img src="media/{{ list.img }}" alt=""
                                                                               title="{{ list.title }}"/></a>
                    </div>
                    <div class="list_right">
                        <div class="list_title">
                            <a href="{% url 'index' %}blog/show{{ list.id }}"><h2>{{ list.title }}</h2></a>
                        </div>

                        <div class="list_abstract">
                            <a href="{% url 'index' %}blog/show{{ list.id }}" title="{{ list.title }}">
                                <p>{{ list.excerpt | slice:":120" }}</p>
                            </a>
                        </div>
                        <div class="meta">
                            <span class="label label-info"><a
                                    href="{% url 'index' %}blog/list{{ list.category_id }}">{{ list.category.nama }}</a></span>
                            发表于：
                            <time class="item"><i class="fa fa-clock-o"></i>{{ list.created_time }}</time>
                        </div>
                        <div class="line">
                            <div style="border:1px solid #b5b5b5"></div>
                        </div>

                    </div>
                </div>
            {% endfor %}
            <div class="pagination">
                <ul>
                    {% if list.has_previous %}
                        <li class="prev-page"><a href="{% url 'index' %}blog/list1?page{{ list.previous_page_number }}">上一页</a>
                        </li>
                    {% else %}
                        <li class="prev-page"></li>
                    {% endif %}
                    {% for num in list.paginator.page_range %}
                        {% if num %}
                            {% ifequal num list.number %}
                                <li class="active"><span>{{ num }}</span></li>
                            {% else %}
                                <li><a href="{% url 'index' %}blog/list1?page={{ num }}">{{ num }}</a></li>
                            {% endifequal %}
                        {% else %}
                            <li class="disabled"><span>...</span></li>
                        {% endif %}
                    {% endfor %}
                    {% if list.has_next %}
                        <li class="next-page"><a
                                href="{% url 'index' %}blog/list1?page={{ list.next_page_number }}">下一页</a></li>
                    {% else %}
                        <li class="prev-page"></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </div>
    <div class="post-right">
        <div class="post-right-title">
            <p>热门推荐</p>
        </div>
        <div class="hot_content">
            <ul>
                {% for h in hot %}
                    <li>
                        <div class="hot_img">
                            <a href="{% url 'index' %}blog/show{{ h.id }}"><img src="media/{{ h.img }}" alt=""
                                                                                title="{{ h.title }}"/></a>
                        </div>
                        <div class="hot_title"><a
                                href="{% url 'index' %}blog/show{{ h.id }}">{{ h.title | slice:":18" }}</a></div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>
<div class="footer">
    <footer style="border-top: 1px solid ; background-repeat: repeat;"
            class="footer">
        <div class="footer-inner">
            <div class="fooert copyright" align="center">
                <a href="##" target="_blank">友情链接：</a>
                <a href="https://www.django.cn/" target="_blank">Django中文网</a>
                | <a href="https://www.runoob.com/" target="_blank">菜鸟教程</a>
                | <a href="http://pyecharts.org/#/zh-cn/" target="_blank">pyecharts</a> |
                <a href="http://sc.chinaz.com/tag_jiaoben/tupianlunbo.html" rel="sitemap">站长素材</a>
                | <a href="##" target="_blank">联系我们</a>
                <p><a href="/" title="dry">dry</a> 版权所有，保留一切权利 ! <a href="https://www.kkkuu.cn/">首页</a> © 2019-2020 ·
                    黔ICP备00000000号</p>
            </div>
    </footer>
</div>
<script src="../static/js/index.js"></script>
</body>
</html>